Example #1
0
    // Start is called before the first frame update
    void Start()
    {
        phase = 3; //Set the phase for this attack

        //Set up for the head throw.
        headScript            = gameObject.AddComponent <Dullahead>();
        headScript.projectile = this.head;

        //Set up for the spine stab

        /*if(gameObject.GetComponent(typeof(DullaStab)) == null)
         * {*/
        stabScript        = gameObject.AddComponent <DullaStab>();
        stabScript.hazard = this.hazard;

        /*}
         * else
         * {
         *  stabScript = gameObject.GetComponent(typeof(DullaStab)) as DullaStab;
         * }*/

        //Set up for spine whip

        /*if(gameObject.GetComponent(typeof(DullaWhip)) == null)
         * {*/
        whipScript        = gameObject.AddComponent <DullaWhip>();
        whipScript.hazard = this.hazard;

        /*}
         * else
         * {
         *  whipScript = gameObject.GetComponent(typeof(DullaWhip)) as DullaWhip;
         * }*/

        reverseWhipScript        = gameObject.AddComponent <DullaReverseWhip>();
        reverseWhipScript.hazard = this.hazard;


        //Set the rows and columns
        tileRowTop = new GameObject[] { tiles[0], tiles[1], tiles[2] };
        tileRowMid = new GameObject[] { tiles[3], tiles[4], tiles[5] };
        tileRowBot = new GameObject[] { tiles[6], tiles[7], tiles[8] };
        tileColMid = new GameObject[] { tiles[1], tiles[4], tiles[7] };
        tileColR   = new GameObject[] { tiles[2], tiles[5], tiles[8] };
        tileColL   = new GameObject[] { tiles[0], tiles[3], tiles[6] };
    }