public override void OnAwake() { { //Player = GameMain.GetInstance().gameMode.playerController.Pawn; } agent = ((GameObject)ownerGO.GetValue()).GetComponent <AIAgent>(); }
public override TaskStatus OnUpdate() { if (ShowObjPos.GetValue() != null) { Debug.Log(nameit + ", ShowPos: " + ShowObjPos.Value.transform.position); } return(TaskStatus.Running); }
public override void OnStart() { base.OnStart(); raw_rotation = transform.rotation; transform.LookAt(((GameObject)player.GetValue()).transform); lookat_rotation = transform.rotation; transform.rotation = raw_rotation; rotate_angle = Quaternion.Angle(raw_rotation, lookat_rotation); total_tm = rotate_angle / (float)rotationSpeed.GetValue(); lerp_tm = 0; }
public override TaskStatus OnUpdate() { if (GuardingPos.GetValue() == null) { GuardingPos.Value = new GameObject("GudPos"); GuardingPos.Value.transform.position = transform.position; } if (FacingPos.GetValue() == null) { FacingPos.Value = new GameObject("FacingPos"); FacingPos.Value.transform.position = transform.position + transform.forward; } return(TaskStatus.Success); }