예제 #1
0
    // Start is called before the first frame update
    void Start()
    {
        GameObject objTako = GameObject.FindWithTag("PlayerCharacter");

        m_TakoControllerScript = objTako.GetComponent <Tako.TakoController>();

        effect = Instantiate(ParticleManagerBehaviour.Instance.GetParticle(ParticleManagerBehaviour.ParticleIndex.KINETICEFFECT), transform.position, Quaternion.identity);
    }
예제 #2
0
    // Start is called before the first frame update
    void Start()
    {
        var tako = GameObject.FindGameObjectWithTag(ObjectTag.PlayerCharacter);

        if (tako != null)
        {
            takoCon = tako.GetComponent <Tako.TakoController>();
        }
        else
        {
            Debug.Log("No tako is found.");
        }
    }
예제 #3
0
        protected void Awake()
        {
            // 変数初期化
            MovingStarList = new List <GameObject>();
            takoModel      = transform.GetChild(0).gameObject;
            animator       = takoModel.GetComponent <Animator>();
            takoScript     = GetComponent <TakoController>();

            // ステートを生成
            AddState(new StateNormal(this, gameObject));
            AddState(new StateWaitingForKineticPowerEnd(this, gameObject));
            AddState(new StateCommandDisable(this, gameObject));
            AddState(new StateMovingBetweenStars(this, gameObject));
            AddState(new StateStayingGoal(this, gameObject));

            // 現在のステートをセット
            SetCurrentState(StateList.Find(m => m.Name == StateName.Normal));
        }