Exemplo n.º 1
0
    public BarrackTowerInfo(int indexId, int barrackId)
        : base(indexId, barrackId)
    {
        soliderId           = towerData._soliderId;
        towerStateMachine   = new StateMachine();
        barrackStart        = new BarrackStart(this);
        barrackIdle         = new BarrackIdle(this);
        barrackConstructing = new BarrackConstructing(this);
        soliderDict         = new Dictionary <int, SoliderInfo>();

        startTime = AnimationCache.getInstance().getAnimation(this.towerBase).getMeshAnimation("start").getAnimTime();
    }
    public BarrackTowerInfo(int indexId, int barrackId)
    {
        this.Id              = indexId;
        this.charId          = barrackId;
        this.eventDispatcher = new MiniEventDispatcher();
        this.towerData       = J_Tower.GetData(barrackId);
        this.towerBase       = towerData._towerBase;
        this.shooter         = towerData._Shooter;
        this.towerType       = towerData._towerType;

        towerStateMachine = new StateMachine();
        barrackStart      = new BarrackStart(this);
        barrackIdle       = new BarrackIdle(this);
        soliderDict       = new Dictionary <int, SoliderInfo>();

        signPos   = new Vector3(0, 0, 0);
        startTime = AnimationCache.getInstance().getAnimation(this.towerBase).getMeshAnimation("start").getAnimTime();
        InitSoliderDict();
    }