Пример #1
0
 public void Start()
 {
     //rigidBody = GetComponent<Rigidbody2D> ();
     //flashText = GetComponent<FlashText> ();
     characterController = GetComponent <CharacterController2D> ();
     ballDispenser       = FindObjectOfType <TennisPlayer> ();
     zombieDispenser     = FindObjectOfType <ZombieDispenser> ();
     isActive            = true;
 }
Пример #2
0
 public void Initialize(GameObject owner, Vector2 direction, Vector2 velocity, float horizontalForce)
 {
     zombieDispenser     = FindObjectOfType <ZombieDispenser> ();
     characterController = GetComponent <CharacterController2D> ();
     characterController.SetHorizontalForce(horizontalForce);
     direction    = new Vector2(0, 1);
     transform.up = direction;
     Owner        = owner;
     Direction    = direction;
     Velocity     = velocity;
     OnInitialized();
 }