public void Kiss() { thisNode.isCanClick = false; state = StateHead.KISS; GameManager.Instance.AddKiss(); this.transform.DOPath(new Vector3[] { transform.position }, 1f).OnComplete(() => { Back(); }); }
void SetState() { if (this.transform.position.x < posSlap.position.x) { this.state = StateHead.NONE; } else if (this.transform.position.x >= posSlap.position.x && this.transform.position.x < posEnd.position.x) { this.state = StateHead.CAN_SLAP; } else if (this.transform.position.x >= posEnd.position.x) { this.state = StateHead.KISS; } }
void Start() { this.RegisterListener(EventID.START_GAME, (param) => ON_START_GAME()); this.state = StateHead.NONE; }