Example #1
0
 // public GameObject hitBox;
 // Start is called before the first frame update
 void Start()
 {
     S             = this;
     dead          = false;
     StartingPos   = this.transform.position;
     CurrentPos    = StartingPos;
     VelocityRight = new Vector3(moveSpeed, 0, 0);
     VelocityLeft  = new Vector3(-moveSpeed, 0, 0);
     StartScale    = this.transform.localScale;
     DeadScale     = new Vector3(this.transform.localScale.x, this.transform.localScale.y, 1);
     ouchBox       = this.gameObject.transform.GetChild(2).gameObject;
 }
Example #2
0
 // Start is called before the first frame update
 void Start()
 {
     pscript = transform.parent.gameObject.GetComponent <EvilVeggie>();
 }