Esempio n. 1
0
        public override void Init()
        {
            base.Init();

            // 着地目標の座標を記録
            targetPosition    = StellaMove.instance.transform.position;
            targetPosition.y += fallHeight;

            // 開始位置を移動させる
            float   mul  = (startHeight - fallHeight) / fallVelocity.y;
            Vector3 spos = targetPosition;

            spos += (mul * fallVelocity);
            StellaMove.instance.transform.position = spos;
            StellaMove.SetAnimTrigger("StartDandelion");

            // 綿毛の位置
            GameObject go = Instantiate(fluffPrefab);

            go.GetComponent <Animator>().SetTrigger("Spawned");
            fluffActable = go.GetComponent <FluffActable>();
            fluffActable.Init(fallVelocity, -mul * 2f);
            fluffActable.SetPositionAndHold(StellaMove.instance.transform.position);

            // アニメ設定
            StellaMove.SetAnimState(StellaMove.AnimType.Dandelion);
            StellaMove.myVelocity = Vector3.zero;

            startFrame = startSkipFrame;
        }
Esempio n. 2
0
 public override void Init()
 {
     base.Init();
     fluffActable = ((FluffActable)ActionBox.SelectedActable);
     holded       = false;
     StellaMove.RegisterAnimEvent(HoldStart);
     StellaMove.SetAnimState(StellaMove.AnimType.Dandelion);
 }