Exemplo n.º 1
0
    // Use this for initialization
    void Start()
    {
        mover = GetComponent <TopdownMover>();
        Utility.Assert(mover != null);

        game = Utility.FindAncestor <TopdownGame>(gameObject);
        Utility.Assert(game != null);

        player = game.GetPlayer();
        Utility.Assert(player != null);

        foreach (Attackable part in gameObject.GetComponentsInChildren <Attackable>())
        {
            parts.Add(part);
            part.dieEvent.AddHandler(gameObject, OnPartDie);
        }
    }
Exemplo n.º 2
0
    // Use this for initialization
    void Start()
    {
        mover = GetComponent<TopdownMover>();
        Utility.Assert( mover != null );

        game = Utility.FindAncestor<TopdownGame>(gameObject);
        Utility.Assert( game != null );

        player = game.GetPlayer();
        Utility.Assert( player != null );

        foreach( Attackable part in gameObject.GetComponentsInChildren<Attackable>() )
        {
            parts.Add(part);
            part.dieEvent.AddHandler(gameObject, OnPartDie);
        }
    }
Exemplo n.º 3
0
 public void Init(Vector3 dir, string word, TopdownGame game)
 {
     this.dir = dir;
     this.word = word;
     this.game = game;
 }
Exemplo n.º 4
0
 public void Init(Vector3 dir, string word, TopdownGame game)
 {
     this.dir  = dir;
     this.word = word;
     this.game = game;
 }