private void Start() { _Room = S_A_GameRoom.GetInstance(); if (_VIS_Task) { GameObject TaskVis = Instantiate(_VIS_Task, _Room._Canvas_Container.transform); S_I_Vis_Task VT = TaskVis.GetComponent <S_I_Vis_Task>(); VT.SetSourceTask(this); } }
IEnumerator IE_DESTROY() { _IE_RUN = true; yield return(new WaitForSeconds(1f)); S_A_GameRoom.GetInstance().DestroyChest(this); Destroy(gameObject); _IE_RUN = false; }
private void Update() { if (!_Enter) { if (_Last_Chest != null) { _Last_Chest.Move(C_V2(_Point_OUT.transform.position), _Speed); } if (_List_Chest.Count < 4) { CreateChest(); } } else { if (_Last_Chest != null) { _Last_Chest.Move(C_V2(_Point_IN.transform.position), _Speed); } Chest_Conv BUF = _List_Chest.Find(A => A._Is_MoveEnd(C_V2(_Point_IN.transform.position))); if (BUF != null) { DeleteChest(BUF.Obj); S_A_GameRoom.GetInstance().DestroyChest(BUF.Obj); if (_List_Chest.Count == 0) { _Last_Chest = null; } } } if (_Last_Chest != null) { if (_Enter) { _Mesh.material.SetFloat("_ScrollYSpeed", -_Speed * KOF_SP_CON); } else { _Mesh.material.SetFloat("_ScrollYSpeed", _Speed * KOF_SP_CON); } } else { _Mesh.material.SetFloat("_ScrollYSpeed", 0); } }
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; }
static public S_Task GetRandomTask() { S_Task Tas = new S_Task(); S_I_Diff DIFF_ = S_A_GameRoom.GetInstance().GetDiff(); float MUL_DIF = DIFF_.GetDiffMul(); float MUL_DIF_M = 2 - MUL_DIF; int Could_Task = ConvertDiff(Random.Range(0, 100), 100, MUL_DIF, 3); int Max_Chest_Task = ConvertDiff(Random.Range(0, 100), 100, MUL_DIF * 1.1f, 4); List <GameObject> Temp = new List <GameObject>(); Temp.AddRange(S_A_GameRoom.GetInstance().GetAllTemplate()); for (int T_ = 0; T_ < Could_Task; T_++) { S_Task_Element ST = new S_Task_Element(); GameObject TT = Temp[Random.Range(0, Temp.Count)]; Temp.Remove(TT); ST._Could = Random.Range(1, Max_Chest_Task); ST._Chest = TT.GetComponent <S_A_Chest>(); Tas.Reward += (int)(ST._Could * 10f * MUL_DIF); Tas.Reward = (int)(Tas.Reward * 1.1f); Tas.Timer += ST._Could * 25f * MUL_DIF_M; Tas._ListTask.Add(ST); } return(Tas); }
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 override void Object_Drop() { if (_IE_Grabling) { return; } _TAGET_CONV = S_A_GameRoom.GetInstance().GetNearCoveers(transform.position, transform.forward); if (_TAGET_CONV) { GameObject[] POSITS = _TAGET_CONV.GetPosit().GetNearPosit(transform.position); _TAGET_CONV_POSIT = POSITS[0]; _TAGET_CONV_NAP = POSITS[1]; StartCoroutine(IE_LAY()); return; } StartCoroutine(IE_DROP()); }
// Start is called before the first frame update void Start() { _Main = S_A_GameRoom.GetInstance().ScoreEvent(); }
private void Start() { _Room = S_A_GameRoom.GetInstance(); }
private void Start() { _Room = S_A_GameRoom.GetInstance(); _OLD_Posit = transform.position; }
private void Awake() { _Ins = this; }