1
0
mirror of https://github.com/Cardidi/dotween-upm-fork.git synced 2025-12-21 01:36:05 +08:00
Daniele Giardini 59737f5dc7 - Added WP8.1 configuration while trying to solve WP8.1 issues with release builds (master and debug work)
- Ignoring HOPoolOperator
- Added GUIStyles used by editors
2015-04-04 13:50:15 +02:00

37 lines
1.4 KiB
C#

using DG.Tweening;
using Holoville.HOPoolOperatorV2;
using UnityEngine;
using System.Collections;
public class PoolingTweens : BrainBase
{
public GameObject prefab;
void Update()
{
if (Input.GetMouseButtonDown(0)) {
Vector3 mousePos = Input.mousePosition;
mousePos.z = -Camera.main.transform.position.z;
Vector3 wPos = Camera.main.ScreenToWorldPoint(mousePos);
if (Input.GetKey(KeyCode.LeftShift)) {
// Spawn path
if (Input.GetKey(KeyCode.Space)) {
Transform t = HOPoolManager.Spawn(TestPOP.DOPathCubeasChild, wPos);
t.GetComponentInChildren<DOTweenPath>().DORestart(true);
} else {
Transform t = HOPoolManager.Spawn(TestPOP.DOPathCube, wPos);
t.GetComponent<DOTweenPath>().DORestart(true);
}
} else {
// Spawn dice
if (Input.GetKey(KeyCode.Space)) {
Transform t = HOPoolManager.Spawn(TestPOP.DOAnimationDiceasChild, wPos);
t.GetComponentInChildren<DOTweenAnimation>().DORestart(true);
} else {
Transform t = HOPoolManager.Spawn(TestPOP.DOAnimationDice, wPos);
t.GetComponent<DOTweenAnimation>().DORestart(true);
}
}
}
}
}