Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System.Collections;
- using System.Collections.Generic;
- using UnityEngine;
- public class PlayerAnimationEvents : MonoBehaviour
- {
- public float runParticlesX;
- public float runParticlesY;
- public float jumpDustX;
- public float jumpDustY;
- public float times = 5f;
- public GameObject runparticlesPrefab;
- [SerializeField] GameObject jumpdustPrefab;
- PlayerMovement playermovement;
- private void Start()
- {
- playermovement = GameObject.Find("MainPlayer").GetComponent<PlayerMovement>();
- }
- public void RunningParticles()
- {
- GameObject runparticles = Instantiate(runparticlesPrefab, transform.position + new Vector3(runParticlesX, runParticlesY, 0), Quaternion.identity);
- Destroy(runparticles, 0.5f);
- }
- public void JumpDust()
- {
- GameObject jumpdust = Instantiate(jumpdustPrefab, transform.position + new Vector3(jumpDustX, jumpDustY, 0), Quaternion.identity);
- Destroy(jumpdust, 0.5f);
- }
- }
Add Comment
Please, Sign In to add comment