Beispiel #1
0
    // Use this for initialization
    void Start()
    {
        controlsHandler = GameObject.Find("ControlsHandler");
        controls        = controlsHandler.GetComponent <ControlsHandling>();
        canpos          = GetComponent <CannonPosToAnim>();
        fireC           = GetComponent <FireCannonball>();
        cannonSound     = GetComponent <CannonSound>();
        audio           = GetComponent <AudioSource>();

        stage               = 0; //0=init 1=horizontal, 2=vertical, 3=charging, 4=fired;
        reset               = false;
        hHasChanged         = false;
        vHasChanged         = false;
        firePowerPerTick    = 1;
        firePowerMultiplier = 50;
    }
Beispiel #2
0
 public void EmptyCannon()
 {
     this.activeCannon    = null;
     this.cannonPosToAnim = null;
 }
Beispiel #3
0
 public void SetCannon(GameObject cannon)
 {
     this.activeCannon    = cannon;
     this.cannonPosToAnim = cannon.GetComponent <CannonPosToAnim>();
 }