private void SetUp() { var Data = Entity.GetComponent <SoulWarriorData>(); var PatronData = Entity.GetComponent <PatronData>(); if (Initilized) { AIUtility.PatronSetUp(Entity, ref Moving, ref MovingRight, Context.PatronRightX, Context.PatronLeftX, Data.NormalMoveSpeed); } else { Initilized = true; AIUtility.RandomPatronInit(Entity, PatronData.PatronStayTime, Context.PatronRightX, Context.PatronLeftX, Data.NormalMoveSpeed, ref Moving, ref MovingRight, ref TimeCount); } }
public override void OnEnter() { base.OnEnter(); Context.CurrentState = KnightState.Patron; DisEngageTimeCount = 0; var Data = Entity.GetComponent <KnightData>(); var PatronData = Entity.GetComponent <PatronData>(); if (Initilized) { AIUtility.PatronSetUp(Entity, ref Moving, ref MovingRight, Context.PatronRightX, Context.PatronLeftX, Data.NormalMoveSpeed); } else { Initilized = true; AIUtility.RandomPatronInit(Entity, PatronData.PatronStayTime, Context.PatronRightX, Context.PatronLeftX, Data.NormalMoveSpeed, ref Moving, ref MovingRight, ref TimeCount); } SetAppearance(); }