Exemple #1
0
 //オーバーライド可
 public virtual void Start()
 {
     if (CanBomb)
     {
         bombsys = BombObj.GetComponent <BombSystem>();
     }
     timer = 0;
 }
    protected override void DestroyFunc()
    {
        GameObject bomb  = Instantiate(BombSphere, transform.position, transform.rotation);
        BombSystem _Bsys = bomb.GetComponent <BombSystem>();

        _Bsys.EXP     = Expansion;
        _Bsys.MAX_EXP = MaxExpansion;
        _Bsys.ATK     = BombAtk;
        _Bsys.ATACKER = Attaker;
        if (_particleSystem)
        {
            _particleSystem.Stop();
        }
    }
    void Awake()
    {
        nodeManager      = GetComponent <NodeManager>();
        gridSys          = GetComponent <GridSystem>();
        coverObjManager  = GetComponent <CoverObjectManager>();
        colorSys         = GetComponent <ColorSystem>();
        inputSys         = GetComponent <InputSystem>();
        scoreSys         = GetComponent <Score>();
        moveSys          = GetComponent <MoveSystem>();
        bombSys          = GetComponent <BombSystem>();
        explosionManager = GetComponent <ExplosionManager>();
        uiManager        = GetComponent <UIManager>();

        instance = this;
    }
Exemple #4
0
    void OnTriggerEnter(Collider coll)       //攻撃を受けた時の判定
    {
        if (coll.gameObject.tag == "Bullet") //弾に当たった時
        {
            bullet = coll.gameObject.GetComponent <Bullet>();
            //Debug.Log(bullet.ATK);
            Now_HP -= bullet.ATK;
        }
        else if (coll.gameObject.tag == "BulletMissile")
        {
            bullet2 = coll.gameObject.GetComponent <Bullet_Missile>();
            Now_HP -= bullet2.ATK;
        }

        if (coll.gameObject.tag == "Bomb")
        {
            bomsys = coll.gameObject.GetComponent <BombSystem>();

            Now_HP -= bomsys.BombATK;
        }

        if (coll.gameObject.tag == "Soldier")
        {
            sol = coll.gameObject.GetComponent <SoldierSystem>();

            sol.startcolcol();
        }

        if (coll.gameObject.tag == "Goal")//拠点到達時
        {
            stage.Endurance--;
            Now_HP -= 1000;
            lose    = true;
            //Destroy(gameObject);
        }
    }
Exemple #5
0
 public void SetupBomb(int bombRange, float secondsToExplode)
 {
     bombSystem            = new BombSystem(bombRange, secondsToExplode);
     bombSystem.onExplode += Explode;
 }