示例#1
0
    void AttackEffect()
    {
        if (is_remote_damage_)
        {
            if (tubo_in_destory_.GetKudamonCount() <= 0)
            {
                is_guard_ = false;
            }

            if (is_guard_)
            {
                return;
            }

            is_guard_ = true;

            PlayAttackCV();

            bool flag_ap = apple_attack_obj_ != null;
            bool flag_le = lemon_attack_obj_ != null;
            bool flag_po = pot_obj_ != null;

            bool flag = flag_ap && flag_le && flag_po;
            if (flag)
            {
                for (int num = 0; num < apple_num_; num++)
                {
                    GameObject game_object = Instantiate(apple_attack_obj_);
                    GameObject pot_obj     = GameObject.Find(pot_obj_.name);
                    game_object.transform.position = pot_obj.transform.position;
                    game_object.name = apple_attack_obj_.name;
                }
                for (int num = 0; num < lemon_num_; num++)
                {
                    GameObject game_object = Instantiate(lemon_attack_obj_);
                    GameObject pot_obj     = GameObject.Find(pot_obj_.name);
                    game_object.transform.position = pot_obj.transform.position;
                    game_object.name = lemon_attack_obj_.name;
                }
            }
            else
            {
                Debug.Log("AttackApple(lemon) または Pot が入っていません");
            }

            // 攻撃エフェクト
            if (POT_LIMIT_NUM <= tubo_in_destory_.GetKudamonCount())
            {
                FindObjectOfType <FruitCreater>().PeachCreate(1);
                GetComponent <EggPlantAttacker>().AttackEggPlant();
            }
            tubo_in_destory_.ResetCount();
            FindObjectOfType <PotGaugeController>().GaugeReset();
        }
        else
        {
            is_guard_ = false;
        }
    }
示例#2
0
    void Update()
    {
        if (!MyNetworkLobbyManager.s_singleton.IsTutorial)
        {
            if (!isLocalPlayer)
            {
                return;
            }
        }

        var count = apple_manager_.transform.childCount;

        count += lemon_manager_.transform.childCount;
        count += peach_manager_.transform.childCount;
        count += egg_plant_manager_.transform.childCount;
        count += tubo_in_destroy_.GetKudamonCount();

        if (count == fruit_count_)
        {
            return;
        }

        CmdTellToServerCount(count);
        fruit_count_ = count;

        if (MyNetworkLobbyManager.s_singleton.IsTutorial)
        {
            remote_fruit_count_ = 260 - count;
        }
    }
示例#3
0
    void Update()
    {
        if (IsCountMax())
        {
            var rotate_speed = -Time.deltaTime * 60.0f;
            effect_.transform.Rotate(Vector3.forward * rotate_speed);
        }

        //if (IsNotCountChange()) { return; }
        //if (current_count_ > 10) { current_count_ = 10; }
        current_count_ = tubo_.GetKudamonCount();
        var ratio = current_count_ * 0.1f;
        var scale = new Vector3(SCALE_X, SCALE_Y * ratio, 1.0f);

        bar_.localScale = scale;

        if (IsCountMax() && effect_.color != Color.white)
        {
            effect_.color = Color.white;
        }
    }