關於即將接手的AR項目,學習進度

在之前三天的代碼研究之後,作爲之前一直從事UI界面開發,基於公司自己的UI框架。一直都是做着簡單的內容,沒有從事過核心玩法框架的經驗,這次來到新的環境,能夠接觸到核心玩法對我來說是一種很好的機會。

這是一款以ARkit開發的類似於Pokermon Go的一款單機遊戲。主要是釣魚玩法,釣到寵物通過完成挑戰去收服它。

代碼框架的核心思路是將遊戲的過程分解:從通過ARKit的功能檢測平面->釣魚前的準備工作->拋竿釣魚->等待魚上鉤->魚上鉤拉竿->收服魚的挑戰過程->挑戰結果;而不同的魚兒挑戰過程也有不同的玩法:射擊,換裝,猜歌,點擊...

遊戲的思路是通過FishAction這個過程的基類:

using UnityEngine;
using System.Collections;

//抽象觸發事件的基礎類
namespace GameWorld
{
    public enum ActingResult
    {
        Acting,
        Compelet,
        UnKnow,
    }
    public enum FishActionType
    {
        Exit2Mian,
        ARCheck,
        FishAimThrow,
        FishWait,
        FishReady,
        FishBite,
        FishFailure,
        FishChallenge,
        FishSuccess,
    }

    public abstract  class FishAction
    {
        protected GameScene m_GS;
        public FishAction(GameScene GameScen)
        {
            m_GS = GameScen;
        }

        protected ActingResult m_Result = ActingResult.Compelet;

        public  ActingResult GetResult
        {
            get { return m_Result; }
        }

        public abstract FishActionType ActionType
        {
            get;
        }

        public abstract void OnActionEnter();

        /// <summary>
        /// 動作進行中
        /// </summary>
        public abstract void OnActionExcute();

        public abstract void OnActionExit();

    }
}

GameScene腳本主要是遊戲場景的生成:

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using GameWorld;

public class GameScene
{
    public TipsCircle TargetCircle;
    public GameObject Water;
    public GameObject FishAimLine;
    public GameObject FishAimTarget;
    public GameObject FishRod;
    public GameObject StartPos;
    public Bait Bait;
    public GameObject Fish;
    //public GameObject OverTips;
    public FishActionManager ActionManager;
    public Camera CurCamera;
    public GameObject ARSystem;

    public GameScene(GameObject water, FishRay fishRay, GameObject fishRod, Bait bait, Camera camera,GameObject ARObject)
    {
        Debug.Log("GameScene初始化");
        ARSystem = ARObject;
        CurCamera = camera;
        CurCamera.gameObject.SetActive(true);
        Water = water;
        TargetCircle = water.GetComponent<TipsCircle>();
        //OverTips = TargetCircle.TipsOver;
        FishAimLine = fishRay.gameObject;
        //fishRay.StartPoint = fishRod.transform.GetChild(0).GetChild(0).transform;
        fishRay.CurCamera = CurCamera;
        FishAimTarget = fishRay.TargetTips;
        FishRod = fishRod;
        StartPos = FishAimLine.GetComponent<FishRay>().StartPoint.gameObject;
        Bait = bait;
        Fish = null;
        Init();
    }

    void Init()
    {
        ActionManager = new FishActionManager(this);
        if (CurCamera.tag=="ARCamera")
            ActionManager.ChangeAction(FishActionType.ARCheck);
        else if (CurCamera.tag == "NormalCamera")
            ActionManager.ChangeAction(FishActionType.FishReady);
    }
	
	public virtual void Update () 
    {
        ActionManager.Update();	
	}
}

FishActionManager是對遊戲流程的管理:

using UnityEngine;
using System.Collections.Generic;
using System;
using GameWorld;

public class FishActionManager : MonoBehaviour 
{
    private Dictionary<FishActionType, FishAction> m_ActionList;

    public FishActionManager(GameScene m_GS)
    {
        m_ActionList = new Dictionary<FishActionType, FishAction>();
        m_ActionList.Add(FishActionType.Exit2Mian, new Exit2Main(m_GS));
        m_ActionList.Add(FishActionType.ARCheck, new ARCheck(m_GS));
        m_ActionList.Add(FishActionType.FishReady, new FishReady(m_GS));
        m_ActionList.Add(FishActionType.FishAimThrow, new FishAimThrow(m_GS));
        m_ActionList.Add(FishActionType.FishBite, new FishBite(m_GS));
        m_ActionList.Add(FishActionType.FishChallenge, new FishChallenge(m_GS));
        m_ActionList.Add(FishActionType.FishWait, new FishWait(m_GS));
        m_ActionList.Add(FishActionType.FishFailure, new FishFailure(m_GS));
        m_ActionList.Add(FishActionType.FishSuccess, new FishSuccess(m_GS));
    }

    public void ChangeAction(FishActionType action)
    {
        CurAction = GetAction(action);
    }

    private FishAction GetAction(FishActionType action)
    {
        return m_ActionList.ContainsKey(action) ? m_ActionList[action] : null;
    }

    private FishAction m_CurAction;
    public FishAction CurAction
    {
        get { return m_CurAction; }
        set 
        {
            if (m_CurAction != null)
                m_CurAction.OnActionExit();

            m_CurAction = value;
            if (m_CurAction != null)
                m_CurAction.OnActionEnter();
        }
    }

    public void Update()
    {
        if (m_CurAction != null)
        {
            m_CurAction.OnActionExcute();
        }
    }

}

每個流程通過繼承自fishAction實現不同的需求再重寫父類的方法,通過FishActionManager的ChangeAction方法改變當前流程的狀態。

FishChallenge流程中分爲很多種玩法,但是玩法總有共通之處,通過FishBase這個玩法基類來實現共同的玩法,子類繼承再去各自實現自己私有的玩法,這樣方便問題的定位以及遊戲的思路更清晰。

FishBase腳本:

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using DG.Tweening;

public class FishBase :MonoBehaviour
{
    public FishData m_data;
    public int Health;
    public int CurHealth;
    public bool IsDJS;
    public float Times;
    public UISprite LimitTips;
    public UILabel TextTips;
    public GameObject NameTips;
    public UISprite HealthTips;
    public int CurNumber;
    public float TogetherTime;
    private float MainTime;
    public FishManager FishManager;
    public FishChallengeState ChallengeState;
    private float MoveActionCD;
    public string State;
    private ProcessFunction PF;
    private ProcessFunction PF_01;
    private int BIBI;
    public bool IsWudi;
    private float FistDelayTime=2;
    private float IdleTime = 5;
    private float CD;
    public bool IsAttack;
    public bool IsCanAttackNMove;
    private AnimatorStateInfo CurAnimaState;
    public int BeAttack = 0;
    public bool IsDebuffPlayer = false;
    public List<string> BulletList = new List<string>();

    //-------------------------------------子類繼承與覆寫
    public virtual void Show()
    {
        FishManager.Tips.GetComponent<UI_TalkText>().BG.mainTexture = FishManager.Tips.GetComponent<UI_TalkText>().Normal;
        FishManager.Tips.GetComponent<UI_TalkText>().Text.color = FishManager.Tips.GetComponent<UI_TalkText>().NormalColor;

        GameFucntion.DeBug("BaseShow");

        if (CurNumber == 1)
        {
            //GameObject Go = GameFunc.CreatEffect("Eff_Fish_common_Showup");
            //Go.transform.SetParent(GameData.CurFishManager.Model.transform);
            //Go.transform.localPosition = new Vector3(0, 0, 0);

            if (GameData.CurFishConfigData.race >= 4)
            {
                AudioManagerAT.ins.SetBGMSound("Audio_Bgm_Battleboss");
            }
            else
            {
                AudioManagerAT.ins.SetBGMSound("Audio_Bgm_Battlecreature");
            }

            if (FishManager.Model.GetComponent<AudioManager>().ShowUp != null)
            {
                AudioManagerAT.ins.SetSFXSound(FishManager.Model.GetComponent<AudioManager>().ShowUp.name);
            }
        }

        MoveActionCD = 2.5f;
        ShowModel(CurNumber);
    }

    public virtual void UpdateCheck() 
    {
        Idle();
        CDing();
        MenuBattleMain.ins.m_MenuCtrl.TipsList.UI_Health.UpdateCheck();
        GameFunc.NGUI2D_Follow_Model3D(MenuBattleMain.ins.m_MenuCtrl.TipsList.UI_Health.gameObject, GameData.CurFishManager.Model.GetComponentInChildren<Emotion>().HeadTop.gameObject);
    }

    protected void DJS(int alpha = 1) 
    {
        if (IsDJS)
        {
            if (FishManager.IsTimeTogether)
            {
                GameFucntion.DeBug("共同倒計時中");
                TogetherTime -= Time.deltaTime;
                //Debug.Log("TogetherTime" + TogetherTime);
                float a = TogetherTime / MainTime;
                //時間進度
                //GameData.NGUICamera.GetComponent<TipsList>().LimitTimeTips.TimeGo(a);
                MenuBattleMain.ins.m_MenuCtrl.TipsList.UI_LimitTime.TimeGo(a);
                //時間顯示
                MenuBattleMain.ins.m_MenuCtrl.TipsList.UI_LimitTime.LimitTimeText.text = ((int)TogetherTime).ToString();
                MenuBattleMain.ins.m_MenuCtrl.TipsList.UI_LimitTime.GetComponent<UIWidget>().alpha = alpha;
                //GameData.NGUICamera.GetComponent<TipsList>().LimitTimeTips.LimitTimeText.text = ((int)TogetherTime).ToString();
                if (TogetherTime <= 0)
                {
                    GameFucntion.DeBug("共同倒計時時間結束");
                    IsDJS = false;
                    ChallengeState = FishChallengeState.Run;
                }
            }
            else
            {
                GameFucntion.DeBug("單獨倒計時中");
                Times -= Time.deltaTime;
                float a = Times / MainTime;
                MenuBattleMain.ins.m_MenuCtrl.TipsList.UI_LimitTime.TimeGo(a);
                //時間顯示
                MenuBattleMain.ins.m_MenuCtrl.TipsList.UI_LimitTime.LimitTimeText.text = ((int)Times).ToString();
                MenuBattleMain.ins.m_MenuCtrl.TipsList.UI_LimitTime.GetComponent<UIWidget>().alpha = alpha;
                if (Times <= 0)
                {
                    GameFucntion.DeBug("單獨倒計時時間結束");
                    IsDJS = false;
                    ChallengeState = FishChallengeState.Run;
                }
            }
        }
    }

    public virtual void Run()   
    {
        
        //探頭動畫
    }

    public virtual void Get() 
    {
    }

    void CDing()
    {
        if (CD > 0)
        {
            CD -= Time.deltaTime;
        }
        else
        {
            CD = 0;
        }
    }

    void Idle()
    {
        if (IdleTime < 0)
        {
            IdleTime = 0;
        }
        else if (IdleTime > 0)
        {
            IdleTime -= Time.deltaTime;
        }
        else if (IdleTime == 0)
        {
            if (State=="Evolutioning")
            {
                IdleTime = Random.Range(7, 15);
                return;
            }
            else
            {
                if (!FishManager.Model.GetComponent<AudioManager>())
                {
                    Debug.Log("您還沒有添加音效管理腳本");
                    return;
                }
                if (FishManager.Model.GetComponent<AudioManager>().Idle != null)
                {
                    if (CD != 0)
                        return;

                    string temnps = "";

                    if (m_data.IsEvolution)
                    {
                        temnps = "Evo";
                    }
                    else
                    {
                        AudioManagerAT.ins.SetSFXSound(FishManager.Model.GetComponent<AudioManager>().Idle.name);
                    }
                        
                    FishManager.Model.transform.GetChild(0).GetComponent<Animator>().Play("Idle" + temnps + "2");
                    
                    CD = 3;
                }
                //}
                IdleTime = Random.Range(7, 15);
            } 
        }
    }

    void ShowTips()
    {
        Debug.Log("123");
        FishManager.Tips.gameObject.SetActive(true);
        State = "ShowIntrduce";
        //State = "ShowTips";
        FishManager.IsCanCheck = true;
    }

    void  ShowModel(int CurNumber)
    {
        if (CurNumber == 1)
        {
            AudioManagerAT.ins.SetSFXSound("Audio_fish_Angler@showup_lighting");
            GameObject Temp = GameFunc.CreatEffect("Eff_Fish_common_Showup");
            Temp.transform.position = GameData.GameSceneData.Water.transform.position;

            FishManager.ShowEffect("ShowSky");
            FishManager.transform.position = GameData.GameSceneData.Water.transform.position;
            FishManager.Model.transform.localPosition = Vector3.zero;
            FishManager.Model.transform.GetChild(0).gameObject.SetActive(true);

            //魚單獨的音效
            if (FishManager.Model.GetComponent<AudioManager>())
                if (FishManager.Model.GetComponent<AudioManager>().ShowUp != null)
                    AudioManagerAT.ins.SetSFXSound(FishManager.Model.GetComponent<AudioManager>().ShowUp.name);

            //FishManager.Model.transform.DOLocalJump(new Vector3(0, 1.7f, 0), 1, 1, 1)
            //    .OnComplete(() => 
            //    {
            //        FishManager.ShowEffect("HideSky", GameData.GameSceneData.Water);
            //        FishManager.Model.GetComponentInChildren<Animator>().Play(CurNumber + "ShowUp");
            //        ChallengeState = FishChallengeState.New;
            //        CheckDJS();
            //        ShowTips();
            //    });

            ProcessFunction PF05 = new ProcessFunction(0, 0, 1, 0.5f,
                (float a) =>
                {
                    float Tempa = (float)(-9 * a * a + 10.7f * a);
                    FishManager.Model.transform.localPosition = new Vector3(0, Tempa, 0);
                },
                () =>
                {
                    MenuBattleMain.GetInstance().m_MenuCtrl.TipsList.UI_HitEffect.gameObject.SetActive(true);
                    ProcessFunction PF = new ProcessFunction(0, 1, 0, 0.25f,
                        (float a) =>
                        {
                            MenuBattleMain.GetInstance().m_MenuCtrl.TipsList.UI_HitEffect.GetComponent<UIWidget>().alpha = a;
                        },
                        () =>
                        {
                            MenuBattleMain.GetInstance().m_MenuCtrl.TipsList.UI_HitEffect.gameObject.SetActive(false);
                            MenuBattleMain.GetInstance().m_MenuCtrl.TipsList.UI_HitEffect.GetComponent<UIWidget>().alpha = 1;
                        });

                    //AudioManagerAT.ins.StopSFXZLF("Audio_fish_Angler@showup_lighting");
                    FishManager.ShowEffect("HideSky");
                    FishManager.Model.GetComponentInChildren<Animator>().Play(CurNumber + "ShowUp");
                    ChallengeState = FishChallengeState.New;
                    CheckDJS();
                    ShowTips();
                });
        }
        else
        {
            FishManager.Model.GetComponentInChildren<Animator>().Play(CurNumber + "ShowUp");
            FishManager.Model.transform.DOLocalMove(new Vector3(0, 1.7f, 0), 1)
            .OnComplete(() =>
            {
                CheckDJS();
                ShowTips();
            });
        }

        GameFunc.ARotation2B(GameData.CurFishManager.Model, GameData.WorldCamera.gameObject.transform.position);

        MenuBattleMain.GetInstance().m_MenuCtrl.TipsList.WhereEnemy.GetComponent<WhereEnemy>().SetTarget(GameData.WorldCamera.gameObject, FishManager.Model);
        MenuBattleMain.GetInstance().m_MenuCtrl.TipsList.WhereEnemy.gameObject.SetActive(true);
        MenuBattleMain.GetInstance().m_MenuCtrl.TipsList.WhereEnemy.GetComponent<UIWidget>().alpha = 1;

        if (FishManager.Model.GetComponentInChildren<TurtleChangeModel>())
        {
            FishManager.Model.GetComponentInChildren<TurtleChangeModel>().Show(CurNumber);
        }
    }

    void CheckDJS()
    {
        if (FishManager.IsTimeTogether)
        {
            GameFucntion.DeBug("共同倒計時");
            MainTime = FishManager.MainTime;
            TogetherTime = FishManager.TogetherTime;
            IsDJS = (TogetherTime != 0);
            LimitTips.gameObject.SetActive(TogetherTime != 0);
        }
        else
        {
            GameFucntion.DeBug("單獨倒計時");
            MainTime = m_data.LimitTime;
            Times = MainTime;
            IsDJS = (Times != 0);
            LimitTips.gameObject.SetActive(Times != 0);
        }
    }

    public void BossAttack()
    {
        if (!IsAttack || !IsCanAttackNMove || ChallengeState!=FishChallengeState.New)
            return;

        IsAttack = false;

        if (!FishManager.Model.GetComponent<MoveAttack>())
            FishManager.Model.AddComponent<MoveAttack>();

        FishManager.Model.GetComponent<MoveAttack>().MoveTarget = FishManager.Model; 
        FishManager.Model.GetComponent<MoveAttack>().ColorTarget02 = FishManager.Model.transform.GetChild(0).GetChild(3).gameObject;
        FishManager.Model.GetComponent<MoveAttack>().ColorTarget = FishManager.Model.transform.GetChild(0).GetChild(1).gameObject;
        FishManager.Model.GetComponent<MoveAttack>().Num = 15;
        FishManager.Model.GetComponent<MoveAttack>().Anim = FishManager.Model.transform.GetChild(0).GetComponent<Animator>();
        FishManager.Model.GetComponent<MoveAttack>().BulletList = BulletList;
        FishManager.Model.GetComponent<MoveAttack>().EnterStart();

    }

    public void MoveAndAttack(function AttackEvent=null)
    {
        if (!IsCanAttackNMove )
            return;

        IsCanAttackNMove = false;

        //不走這邊的CD,走單獨的攻擊腳本以複用
        if (!FishManager.Model.GetComponent<MoveAndAttack>())
            FishManager.Model.AddComponent<MoveAndAttack>();

        FishManager.Model.GetComponent<MoveAndAttack>().MoveTarget = FishManager.Model;
        FishManager.Model.GetComponent<MoveAndAttack>().BulletCount = m_data.BulletCount;
        FishManager.Model.GetComponent<MoveAndAttack>().ActionMoveType = m_data.MoveType;
        
        FishManager.Model.GetComponent<MoveAndAttack>().BulletTarget = FishManager.WorldCamera.transform;
        FishManager.Model.GetComponent<MoveAndAttack>().BulletShootType = m_data.BulletShootType;
        FishManager.Model.GetComponent<MoveAndAttack>().Anim = FishManager.Model.GetComponentInChildren<Animator>();
        //FishManager.Model.GetComponent<MoveAndAttack>().Anim = FishManager.Model.transform.GetChild(0).GetComponent<Animator>();
        FishManager.Model.GetComponent<MoveAndAttack>().BulletNameList = BulletList;

        if (m_data.BulletList != null) 
        { 
            FishManager.Model.GetComponent<MoveAndAttack>().BulletNameList = m_data.BulletList;
            //FishManager.Model.GetComponent<MoveAndAttack>().BulletNumLimit = new List<int>(m_data.BulletList.Count);
        }

        FishManager.Model.GetComponent<MoveAndAttack>().AttackFramePercent = GameData.CurFishConfigData.AttackFrame;
        FishManager.Model.GetComponent<MoveAndAttack>().AttackLength = GameData.CurFishConfigData.AttackLength;
        if (AttackEvent != null)
            FishManager.Model.GetComponent<MoveAndAttack>().AttackEvent = AttackEvent;
        FishManager.Model.GetComponent<MoveAndAttack>().EnterStart();
        GameFucntion.DeBug("一次移動和攻擊初始化成功");
    }

    public void ClearMoveAndAttack()
    {
        if (FishManager.Model.GetComponentInChildren<MoveAndAttack>())
            FishManager.Model.GetComponent<MoveAndAttack>().Clear();
    }

    public void Evolution()
    {
        string Temp = "";
        if (m_data.IsEvolution)
        {
            FishManager.ShowEffect("ShowSkyEvo");
            FishManager.ShowEffect("AlwaysSky");
            FishManager.Model.transform.GetChild(0).GetComponent<Animator>().Play("Evo");
            AudioManagerAT.ins.SetSFXSound("skill_sound_robot_charge");
            Temp = "Evo";
        }

        FishManager.Model.GetComponent<Emotion>().SetBaseMoji("Normal" + Temp);
        EyeTips("Active", 1);
        State = "Evolutioning";
    }


    public void ShowTextTips(int Temp=0)
    {
        //擊退+聲音+特效
        if (Temp % 4 != 0 || FishManager.Tips.GetComponent<UIWidget>().alpha > 0 )//|| IsWudi)
        {
            return;
        }
            

        if (m_data.IsOneByOne) //一個字一個字說話
        {
            if (BIBI == 0)
                BIBI = Random.Range(1, m_data.Text.Count);
            BIBI++;

            int max=0;
            if (m_data.IsAttack)//根據攻擊判定臺詞
                max = m_data.Text.Count - 1;
            else
                max = m_data.Text.Count;

            if (BIBI >= max)
                BIBI = 1;
        }
        else
        {
            if (m_data.IsAttack)
                BIBI = Random.Range(1, m_data.Text.Count - 1);
            else
                BIBI = Random.Range(1, m_data.Text.Count);
        }


        FishManager.Tips.GetComponent<UIWidget>().alpha = 1;
        MenuBattleMain.ins.m_MenuCtrl.TipsList.UI_TalkText.text = m_data.Text[BIBI];

        PF = new ProcessFunction(0, 1, 0, 3,
            (float a) =>
            {
                if (!FishManager.Tips)
                    return;
                FishManager.Tips.GetComponent<UIWidget>().alpha = a;
            }, null);
    }

    /// <summary>
    /// 顯示眼睛的表情
    /// </summary>
    /// <param name="Temp">點擊次數(如果與點擊次數有關的話)</param>
    /// <param name="str">指定表情</param>
    /// <param name="EndTime">持續時間</param>
    public void ShowEmotion(int Temp = 0, string str = "",float EndTime=0)
    {
        if (FishManager.Model.GetComponent<Emotion>().IsActing)
            return;

        if (Temp % 5 == 0)
        {
            if (str != null)
                if (m_data.IsEvolution)
                    str += "Evo";
            FishManager.Model.GetComponent<Emotion>().ShowEyes(str, EndTime);
        }
        if (Temp == (int)(m_data.Health * 0.6f))//面部表情改底子
        {
            string a = "Negative";
            if (m_data.IsEvolution)
                a += "Evo";
            FishManager.Model.GetComponent<Emotion>().SetBaseMoji(a);
        }
        if (Temp == m_data.Health - 1)//面部表情底子搞回來
        {
            string a = "Normal";
            if (m_data.IsEvolution)
                a += "Evo";
            FishManager.Model.GetComponent<Emotion>().SetBaseMoji(a);
        }
    }

    /// <summary>
    /// 切換通用moji表情 (可以在循環,內部有CD,也可以單次指定)
    /// </summary>
    /// <param name="str">指定moji表情  1=!       2=糾結          3=?</param>
    /// <param name="Time">持續多久</param>
    public void ShowEmoji(EmojiType Type, MoveType Action = MoveType.Scale, string str = "", float Time = 1)
    {
        //Debug.Log("ShowEmoji");
        if (FishManager.Emoji.GetComponent<Emoji>().IsActing || CD != 0)
            return;

        FishManager.Emoji.GetComponent<Emoji>().SetEmoji(Type, str, Action, Time);

        #region[Old Moji]

        //if (Temp == 0)
        //{
        //    if (str != null)
        //        FishManager.Emoji.GetComponent<Emoji>().SetTex(str, MoveType.Scale, Time);
        //}
        //else
        //{
        //    if (Temp != 0 && Temp % 6 == 0)//頻率=Temp ; 定製=Str
        //    {
        //        if (str != null)
        //            FishManager.Emoji.GetComponent<Emoji>().SetTex(str, MoveType.Scale, Time);
        //        else
        //            FishManager.Emoji.GetComponent<Emoji>().SetTex(a.ToString(), MoveType.Scale, Time * 1.5f);
        //    }
        //    else if (Temp != 0 && Temp % 8 == 0)
        //        FishManager.Emoji.GetComponent<Emoji>().SetTex("2", MoveType.Scale, Time);
        //}
        #endregion

        //對應的情緒的聲音
        int a = Random.Range(1, 4);

        if (FishManager.Model.GetComponent<AudioManager>().Angery != null)
        {
            if (Type == EmojiType.Nagetive || a == 2)
                AudioManagerAT.ins.SetSFXSound(FishManager.Model.GetComponent<AudioManager>().Angery.name);
        }

        CD = 3;
    }

    public void EyeTips(string emoji, float EndTime)
    {
        string Temp = emoji;
        if (m_data.IsEvolution)
            Temp += "Evo";
        if (!FishManager.Model.GetComponent<Emotion>())
        {
            Debug.Log("您還沒有添加Emotion腳本");
            return;
        }
         FishManager.Model.GetComponent<Emotion>().ShowEyes(Temp, EndTime);
    }
}

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章