예제 #1
0
        public override void OnDoubleClick(Mobile from)
        {
            squirrel s = new squirrel();

            s.Controlled    = true;
            s.ControlMaster = from;
            s.Location      = from.Location;
            s.Map           = from.Map;
            s.IsBonded      = true;
            this.Delete();
        }
예제 #2
0
    void SpawnSquirrel(int x, int y)
    {
        if (x == 9)
        {
            GameObject squirrel     = Instantiate(SquirrelObject, new Vector3(x, y, 0), Quaternion.identity).gameObject;
            squirrel   squirrelMain = FindObjectOfType <squirrel>();
            squirrelMain.msm = this;
            squirrelMain.Flip();
            numSquirrels++;
        }

        else
        {
            GameObject squirrel     = Instantiate(SquirrelObject, new Vector3(x, y, 0), Quaternion.identity).gameObject;
            squirrel   squirrelMain = FindObjectOfType <squirrel>();
            squirrelMain.msm = this;
            numSquirrels++;
        }
    }