/// イベントの再生 public void Play(GameActorProduct trgActor, GameActorEventContainer eveCntr) { if (eveCntr.Num > 0) { GameCtrlManager ctrlResMgr = GameCtrlManager.GetInstance(); for (int i = 0; i < eveCntr.Num; i++) { GameObjProduct trgObj = eveCntr.GetEntryObj(i); /// ダメージ if (eveCntr.GetEventId(i) == ActorEventId.Damage) { trgActor.SetEventDamage(trgObj, (Data.AttackTypeId)eveCntr.GetEntryAtb(i)); } /// エフェクト再生 else if (eveCntr.GetEventId(i) == ActorEventId.Effect) { if (trgObj != null) { ctrlResMgr.CtrlEffect.EntryEffect((Data.EffTypeId)eveCntr.GetEntryAtb(i), trgObj); } else { ctrlResMgr.CtrlEffect.EntryEffect((Data.EffTypeId)eveCntr.GetEntryAtb(i), eveCntr.GetTrgPos(i)); } } /// 相手の方へ向く else if (eveCntr.GetEventId(i) == ActorEventId.LookTrg) { trgActor.SetLookTrgPos(eveCntr.GetTrgPos(i)); } /// 相手の方へ振り向く else if (eveCntr.GetEventId(i) == ActorEventId.TurnTrg) { if (trgObj != null) { trgActor.SetEventTurnPos(new Vector3(trgObj.Mtx.M41, trgObj.Mtx.M42, trgObj.Mtx.M43), eveCntr.GetEntryAtb(i)); } } /// スーパーアーマー化 else if (eveCntr.GetEventId(i) == ActorEventId.SuperArm) { trgActor.SetEventSuperArm(); } /// 動作キャンセル else if (eveCntr.GetEventId(i) == ActorEventId.MvtCancel) { trgActor.SetEventMvtCancel(); } } } eveCntr.Clear(); }
/// 破棄 public void Term() { if (calCollLook != null) { calCollLook.Term(); } if (EventCntr != null) { EventCntr.Clear(); EventCntr.Term(); } actorStg.Term(); actorDestination.Term(); EventCntr = null; calCollLook = null; actorStg = null; actorDestination = null; }
/// イベントの再生 public void Play( GameActorProduct trgActor, GameActorEventContainer eveCntr ) { if( eveCntr.Num > 0 ){ GameCtrlManager ctrlResMgr = GameCtrlManager.GetInstance(); for( int i=0; i<eveCntr.Num; i++ ){ GameObjProduct trgObj = eveCntr.GetEntryObj( i ); /// ダメージ if( eveCntr.GetEventId( i ) == ActorEventId.Damage ){ trgActor.SetEventDamage( trgObj, (Data.AttackTypeId)eveCntr.GetEntryAtb( i ) ); } /// エフェクト再生 else if( eveCntr.GetEventId( i ) == ActorEventId.Effect ){ if( trgObj != null ){ ctrlResMgr.CtrlEffect.EntryEffect( (Data.EffTypeId)eveCntr.GetEntryAtb( i ), trgObj ); } else{ ctrlResMgr.CtrlEffect.EntryEffect( (Data.EffTypeId)eveCntr.GetEntryAtb( i ), eveCntr.GetTrgPos( i ) ); } } /// 相手の方へ向く else if( eveCntr.GetEventId( i ) == ActorEventId.LookTrg ){ trgActor.SetLookTrgPos( eveCntr.GetTrgPos( i ) ); } /// 相手の方へ振り向く else if( eveCntr.GetEventId( i ) == ActorEventId.TurnTrg ){ if( trgObj != null ){ trgActor.SetEventTurnPos( new Vector3( trgObj.Mtx.M41, trgObj.Mtx.M42, trgObj.Mtx.M43 ), eveCntr.GetEntryAtb( i ) ); } } /// スーパーアーマー化 else if( eveCntr.GetEventId( i ) == ActorEventId.SuperArm ){ trgActor.SetEventSuperArm(); } /// 動作キャンセル else if( eveCntr.GetEventId( i ) == ActorEventId.MvtCancel ){ trgActor.SetEventMvtCancel(); } } } eveCntr.Clear(); }