public void ReviveFunc() { if (counter != null) { counter.gameObject.SetActive(true); } if (risingObject != null) { risingObject.ReviveAction(); } if (characterJump != null) { characterJump.PowerJump(ItemData.PowerJumpPower - 8f, false); } if (maxHeight != null) { if (characterJump != null) { characterJump.gameObject.transform.position = new Vector3(0, maxHeight.MaxHeight, 0); } } }
private void OnTriggerEnter2D(Collider2D collision) { if (collision.gameObject.name == "Player") { switch (itemType) { case DropItemType.Wing: { CharacterJump jump = collision.gameObject.GetComponent <CharacterJump>(); if (jump != null) { jump.PowerJump(ItemData.PowerJumpPower); } this.gameObject.SetActive(false); } break; case DropItemType.Brush: { if (platformMaker != null) { platformMaker.StartBrushMode(rgbType); } this.gameObject.SetActive(false); #if UNITY_EDITOR Debug.Log("Brush"); #endif } break; } } }