示例#1
0
 void Awake()
 {
     sound            = GetComponent <PlayOneSound>();
     source           = GetComponent <AudioSource>();
     rb               = GetComponent <Rigidbody2D>();
     cam.orthographic = true;
     tempColor        = outSideZone.color;
 }
示例#2
0
 private void Start()
 {
     player               = GetComponentInParent <Player>();
     spriteRenderer       = GetComponent <SpriteRenderer>();
     notBuildingColor     = new Vector4(spriteRenderer.color.r, spriteRenderer.color.g, spriteRenderer.color.b, 0.2f);
     spriteRenderer.color = notBuildingColor;
     lifeBarFloat         = spriteLifeBar.transform.localScale.x;
     maxHealth            = health;
     soundScript          = GetComponent <PlayOneSound>();
 }
    //public float camViewPositionX = -5;
    //public float camViewPositionY = 0;
    //private Vector3 camViewPosition;

    private void Start()
    {
        source       = GetComponent <AudioSource>();
        Audio        = GetComponent <PlayOneSound>();
        animator     = PlayerSp.GetComponent <Animator>();
        sp           = PlayerSp.GetComponent <SpriteRenderer>();
        rb           = GetComponent <Rigidbody>();
        manageButton = GetComponent <ManagerButtonPlayer>();
        speed        = speedBase;

        cam.orthographic = true;
        baseCamPosition  = cam.transform.localPosition;
        //camViewPosition = new Vector2(camViewPositionX, camViewPositionY);
    }
示例#4
0
 private void Start()
 {
     playSound = GetComponent <PlayOneSound>();
 }
示例#5
0
 void Start()
 {
     sound = GetComponent <PlayOneSound>();
 }