示例#1
0
    // Update is called once per frame
    void Update()
    {
        unitychan c3 = refObj3.GetComponent <unitychan>();
        Plate1    c4 = refObj4.GetComponent <Plate1>();

        animator.SetBool(doWalkId, true);
        Debug.Log("true");

        if (c3.transform.position.x < unitychan.setPos.x)
        {
            c3.transform.position += new Vector3(6f * Time.deltaTime, 0f, 0f);
        }

        else if (c3.transform.position.x >= unitychan.setPos.x && c4.transform.position.z > 0)
        {
            animator.SetBool(doWalkId, false);
        }

        else if (c4.transform.position.z <= 0 && c3.transform.position.x < 18f)
        {
            animator.SetBool(doWalkId, true);
            Debug.Log("true");
            c3.transform.position += new Vector3(6f * Time.deltaTime, 0f, 0f);
        }

        else if (c3.transform.position.x >= 18f)
        {
            animator.SetBool(doWalkId, false);
            Debug.Log("false");
        }
    }
示例#2
0
 // Start is called before the first frame update
 void Start()
 {
     StartHint();
     myPlate1 = GameObject.Find("plate1").GetComponent <Plate1>();
     myPlate2 = GameObject.Find("plate2").GetComponent <Plate2>();
     myPlate3 = GameObject.Find("plate3").GetComponent <Plate3>();
     myPlate4 = GameObject.Find("plate4").GetComponent <Plate4>();
 }
示例#3
0
        public override int GetHashCode()
        {
            unchecked
            {
                int result = 7411;
                result = (result * 733) ^ Plate1.GetHashCode();
                result = (result * 733) ^ Plate2.GetHashCode();

                foreach (string s in Rotors)
                {
                    result = (result * 733) ^ s.GetHashCode();
                }
                foreach (string s in Notches)
                {
                    result = (result * 733) ^ s.GetHashCode();
                }
                foreach (string s in Moves)
                {
                    result = (result * 733) ^ s.GetHashCode();
                }

                return(result);
            }
        }