Пример #1
0
    // Update is called once per frame
    void Update()
    {
        float inputSpeed = 0;

        Debug.Log(Player.ToString());
        inputSpeed = Input.GetAxisRaw(Player.ToString());

        transform.position += new Vector3(0f, 0f, MovementSpeed * inputSpeed * Time.deltaTime);
    }
Пример #2
0
        public void playNextVFX()
        {
            if (b_vfx_running || my_buffs.Count == 0)
            {
                return;
            }
            if (index_buff_vfx >= my_buffs.Count)
            {
                index_buff_vfx = 0;
            }
            if (my_buffs[index_buff_vfx].my_buff_info.effect == eBuff_Effect.Halo)
            {
                index_buff_vfx++;
                return;
            }
            GameObject obj = BKTools.addVFX(PrefabPath.VFX_Buff_Prefix + my_buffs[index_buff_vfx].my_buff_info.duration_vfx + ".prefab");

            if (obj)
            {
                obj.transform.SetParent(transform, true);
                //my_buffs[index_buff_vfx].vfx_duration.Add(obj);   暂时仅对halo有效
                obj.transform.localPosition = Buff_Info.vfx_off_buff;
                BuffAnimator ba = obj.GetComponent <BuffAnimator>();
                ba.owner = this;
                Debug.Log("增加" + belong.ToString() + ":" + ba.gameObject.name);
                b_vfx_running = true;
            }
            index_buff_vfx++;
        }