Ejemplo n.º 1
0
    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);
    }
Ejemplo n.º 2
0
    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);
        }
    }
Ejemplo n.º 3
0
    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);
        }
    }
Ejemplo n.º 4
0
 public void Drop()
 {
     m_NextState = new MovementDrop(m_Character);
 }
Ejemplo n.º 5
0
 public void Drop()
 {
     m_NextState = new MovementDrop(m_Character);
 }