Beispiel #1
0
    public void Init(InstanceUnit unit, DataConfig.TEAM team, Vector3 fightPos, int slotIndex)
    {
        this._unit = unit;
        this._team = team;

        gameObject.transform.position = fightPos;

        _slotIndex = slotIndex;

        if (team == DataConfig.TEAM.ENEMY)
        {
            RenderHelper.ChangeWholeModelColor(gameObject, Color.blue);
        }

        TankSpineAttach spine = GetComponent <TankSpineAttach> ();

        if (spine != null)
        {
            spine.Attach(gameObject, unit.dataUnit.asset);
        }
    }