コード例 #1
0
 void Start()
 {
     //controller = gameObject.GetComponentInHierarchy<PlayerInfo> ().controller;
     foreach (AnalogToAxisLayer a in GetComponents <AnalogToAxisLayer>())
     {
         if ((a.type == StickType.MOVEMENT) && (a.direction == StickDirection.HORIZONTAL))
         {
             LeftRight = a;
         }
         if ((a.type == StickType.MOVEMENT) && (a.direction == StickDirection.VERTICAL))
         {
             UpDown = a;
         }
     }
 }
コード例 #2
0
 void Start()
 {
     targetRot = transform.rotation;
     foreach (AnalogToAxisLayer a in GetComponents <AnalogToAxisLayer>())
     {
         if ((a.type == StickType.ATTACK) && (a.direction == StickDirection.HORIZONTAL))
         {
             LeftRight = a;
         }
         if ((a.type == StickType.ATTACK) && (a.direction == StickDirection.VERTICAL))
         {
             UpDown = a;
         }
     }
     //controller = gameObject.GetComponentInHierarchy<PlayerInfo> ().controller;
 }
コード例 #3
0
    void Start()
    {
        foreach (Image i in player1ScoreList)
        {
            i.color = new Color(i.color.r, i.color.g, i.color.b, 30f / 255f);
        }
        foreach (Image i in player2ScoreList)
        {
            i.color = new Color(i.color.r, i.color.g, i.color.b, 30f / 255f);
        }

        LeftRight    = gameObject.AddComponent <AnalogToAxisLayer> ();
        LeftRightAlt = gameObject.AddComponent <AnalogToAxisLayer> ();

        LeftRight.axisName    = PlayerInfoPasser.GetController(0).movement.x.axisName;
        LeftRightAlt.axisName = PlayerInfoPasser.GetController(1).movement.x.axisName;

        victory1Image.color = Color.clear;
        victory2Image.color = Color.clear;
        MessagingManager.AddListener(this);
    }