示例#1
0
 // Use this for initialization
 void Start()
 {
     ParamaterPasser     = FindObjectOfType <ParamaterPasser>();
     mybody              = GetComponent <Rigidbody2D> ();
     BoxCollider         = GetComponent <BoxCollider2D> ();
     SpeedMileStoneCount = SpeedIncreaceMileStone;
     MySkin              = transform.GetChild(0).GetComponent <SpriteRenderer> ();
     MySkin.sprite       = ParamaterPasser.ChosenSkin;
     gameObject.SetActive(true);
 }
示例#2
0
    // Use this for initialization
    void Start()
    {
        OwnedSkinIndexs = PlayerPrefsX.GetIntArray("OwnedSkinIndexs", 27, 1);
        ParamaterPasser = FindObjectOfType <ParamaterPasser>();
        StartupPosition = CharcterView.transform.position;

        if (PlayerPrefs.HasKey("ChosenSkin"))
        {
            ParamaterPasser.ChosenSkin = PlayerSkins[PlayerPrefs.GetInt("ChosenSkin")];
        }
    }