Example #1
0
 protected override void Start()
 {
     shipComponent                 = GetComponent <ShipComponent>();
     ship                          = shipComponent.ParentShip;
     control                       = ship.GetComponent <ShipControl>();
     laserBase                     = shipComponent.Blocks[new Vector2Int(0, 0)].GetComponent <Animator>();
     head                          = shipComponent.Blocks[new Vector2Int(0, 1)].GetComponent <Animator>();
     laserTriggeerDamage           = LaserGlow.GetComponent <LaserTriggerDamage>();
     laserTriggeerDamage.shipLaser = this;
     control.AddWeapon(this);
     base.Start();
 }
Example #2
0
 public void SetShip(Ship ship)
 {
     health.ship = ship;
     Sp.control  = ship.GetComponent <ShipControl>();
 }