public void addDrop(Vector3 droppos) { GameObject newobj = Instantiate(template, droppos, Quaternion.identity); if (drops.Last != null) { MovementDrop md = drops.Last.Value.GetComponent <MovementDrop>(); md.nextHop = newobj; } drops.AddLast(newobj); }
public override void Update() { base.Update(); if (Math.Sign(m_VerticalAxis) == 1) { m_NextState = new MovementClimb(m_Character); (m_NextState as MovementClimb).m_TargetPosition = m_TargetPosition; } if (Math.Sign(m_VerticalAxis) == -1) { m_Character.GetComponent <Animator>().SetTrigger("Drop"); m_NextState = new MovementDrop(m_Character); } }
public override void Update() { base.Update(); if (Math.Sign(m_VerticalAxis) == 1) { m_NextState = new MovementClimb(m_Character); (m_NextState as MovementClimb).m_TargetPosition = m_TargetPosition; } if (Math.Sign(m_VerticalAxis) == -1) { m_Character.GetComponent<Animator>().SetTrigger("Drop"); m_NextState = new MovementDrop(m_Character); } }
public void Drop() { m_NextState = new MovementDrop(m_Character); }