Example #1
0
 public void leaveControlledEnemy()
 {
     controlledEnemy.gameObject.tag = "Enemy";
     controlledEnemy.leavePlayerControl();
     controlledEnemy.speed /= playerControlledSpeedMultiplier;
     controlledEnemy.GetComponent <SpriteRenderer>().color = UnityEngine.Color.white;
 }
Example #2
0
 public void setControlledEnemy(PossessableEnemy e)
 {
     if (controlledEnemy != null)
     {
         controlledEnemy.leavePlayerControl();
     }
     e.gameObject.tag     = "Player";
     this.controlledEnemy = e;
     e.speed = e.speed * playerControlledSpeedMultiplier;
     Debug.Log(playerControlledSpeedMultiplier);
     e.enterPlayerControl();
     this.transform.SetParent(controlledEnemy.transform);
     controlledEnemy.GetComponent <SpriteRenderer>().color = new Color(0.7f, 0.7f, 0.95f);
     playerHealth = e.health;
 }