コード例 #1
0
ファイル: Player_MobaAI.cs プロジェクト: moto2002/moba
    protected override void OnStart()
    {
        mo           = SceneMoba1.instance;
        myTower      = thisCs.groupIndex == 1 ? mo.TowerBlue : mo.TowerRed;
        myCamp       = thisCs.groupIndex == 1 ? mo.CampBlue : mo.CampRed;
        enemyTower   = thisCs.groupIndex == 1 ? mo.TowerRed : mo.TowerBlue;
        enemyCamp    = thisCs.groupIndex == 1 ? mo.CampRed : mo.CampBlue;
        myHome       = thisCs.groupIndex == 1 ? mo.HomeBlue : mo.HomeRed;
        myHomeRadius = myHome.GetComponent <SphereCollider>().radius;
        aiSkillHandler.SetSkills(thisCs.GetSkills());

        initDefendHp = defendHpRate;
        if (myTower != null)
        {
            mal = myTower.GetComponentInChildren <MobaAddLife>();
        }
    }
コード例 #2
0
    void ShowDeathEffect(CharacterState mcs)
    {
        DeathEffect.gameObject.SetActive(false);
        DeathEffect.gameObject.SetActive(true);
        NormalState.gameObject.SetActive(false);
        if (cc != null)
        {
            cc.enabled = false;
        }
        if (navOb != null)
        {
            navOb.enabled = false;
        }

        // cs.redCircle.gameObject.SetActive(false);
        MobaAddLife mal = GetComponentInChildren <MobaAddLife>();

        if (mal != null)
        {
            mal.gameObject.SetActive(false);
        }
        AttackCircle.gameObject.SetActive(false);
        mcs.OnDead -= ShowDeathEffect;
    }