void Start()
 {
     if (bc == null) {
         bc = BattleController.instance;
     }
     this.tForm = transform;
     this.sControl = GetComponent<ShipControlPC>();
     if (sControl == null) {
         this.sControl = GetComponent<EnemyShipControl>();
         if (sControl == null) {
             this.sControl = GetComponent<ShipControlTouch>();//TODO: touch control
             if (sControl == null) {
                 this.sControl = GetComponent<EnemyBossControl>();
             }
         }
     }
     sControl.initialize(this);
     if (gameObject.tag == "Player") {
         player = this;
         this.cropShipPosition = true;
         tForm.position = BattleController.CropShipPosition(tForm.position, shipSize);
     } else {
         this.cropShipPosition = false;
     }
 }
 public void initialize(ShipController sc)
 {
     this.sc = sc;
     targetPositionX = BattleCamera.sWidth - sc.shipSize.x*2;
     sc.accDirectionChanged(new Vector2(0, 1));
 }
        public float startDelay = 3.0f; //delay after respawn

        #endregion Fields

        #region Methods

        public void initialize(ShipController sc)
        {
            this.sc = sc;
            sc.accDirectionChanged(new Vector2(0, 1));
        }
 public void initialize(ShipController sc)
 {
     this.sc = sc;
 }
Esempio n. 5
0
 void Start()
 {
     this.sp = ShipController.player;
 }