public Chest_Conv(Chest_Conv Parens_, S_A_Chest Obj_) { Parens = Parens_; if (Parens != null) { Parens.Child = this; } Obj = Obj_; }
override public void DeleteChest(S_A_Chest Ch_) { Chest_Conv CC = _List_Chest.Find(A => A.Obj == Ch_); if (CC == null) { return; } CC.ClearChild(); _List_Chest.Remove(CC); }
private void Move() { if (_HandControl.Is_Freeze()) { return; } Vector3 Posit = transform.position; Vector3 Posit_Vel = (Posit - _OLD_Posit).normalized; Posit_Vel.y = 0; if (Posit_Vel.magnitude > 0.01f) { Quaternion N = Quaternion.LookRotation(Posit_Vel, Vector3.up); transform.rotation = Quaternion.RotateTowards(transform.rotation, N, 8f); } _OLD_Posit = Posit; if (!_HandControl.Is_Ready()) { return; } if (!_Room.IS_GAME()) { return; } float H = Input.GetAxis("Horizontal"); float V = Input.GetAxis("Vertical"); if (Mathf.Abs(H) < 0.1f) { H = 0; } if (Mathf.Abs(V) < 0.1f) { V = 0; } float FIN_MUL = Mul_Move; S_A_Chest CH = _HandControl.GetCaptureChest(); if (CH != null) { FIN_MUL *= CH._Mul_Move; } _Body.velocity = Vector3.Lerp(_Body.velocity, (Vector3.forward * V + Vector3.left * -H) * FIN_MUL, 0.5f); }
override public void AddChest(S_A_Chest Chest_) { _Chest = Chest_; _Chest._Enable = false; Chest_Conv Buf = new Chest_Conv(_Last_Chest, _Chest); _List_Chest.Add(Buf); _Last_Chest = Buf; if (_Task_Event_M != null) { _Task_Event_M.E_Chest(Chest_); } }
public void CreateChest() { GameObject G = Instantiate(S_A_GameRoom.GetInstance().GetRandomTemplate(), _Point_IN.transform.position, _Point_IN.transform.rotation); _Chest = G.GetComponent <S_Chest>(); _Chest.FreezeBody(); _Chest.RegContainer(this); S_A_GameRoom.GetInstance().AddChest(_Chest); Chest_Conv Buf = new Chest_Conv(_Last_Chest, _Chest); _List_Chest.Add(Buf); _Last_Chest = Buf; }
public override void Object_Grab() { if (_IE_Grabling) { return; } S_ResultNearPosit Posit = S_A_GameRoom.GetInstance().GetNearChest(transform.position); if (Posit == null) { return; } _TAGET_Chest = Posit._Chest; _TAGET_POSIT = Posit._TAGET; _TAGET_NAP = Posit._NAP; StartCoroutine(IE_GRABLING()); }
public void E_Chest(S_A_Chest Ch_) { if (_Task != null) { S_Task_Element SE = _Task.GetSubTask(_Task.CouldSubTask() - 1); if (Ch_._ID == SE._Chest._ID) { SE._Could--; } else { _Task.Failed(); } if (SE._Could <= 0) { _Task.DeleteTask(_Task.CouldSubTask() - 1); } } }
abstract public void DeleteChest(S_A_Chest Ch_);
abstract public void AddChest(S_A_Chest Chest_);
private void Clear() { _TAGET_Chest = null; _TAGET_POSIT = null; }
public void DestroyChest(S_A_Chest Chest_) { _Chests.Remove(Chest_); Destroy(Chest_.gameObject); }
public void AddChest(S_A_Chest Chest_) { _Chests.Add(Chest_); }