Пример #1
0
    private void Awake()
    {
        this.startingColor = base.GetComponent <Renderer>().material.color;
        Targetable component = base.GetComponent <Targetable>();

        component.AddOnDetectedDelegate(new Targetable.OnDetectedDelegate(this.MakeMeBig));
        component.AddOnDetectedDelegate(new Targetable.OnDetectedDelegate(this.MakeMeGreen));
        component.AddOnNotDetectedDelegate(new Targetable.OnNotDetectedDelegate(this.MakeMeNormal));
        component.AddOnNotDetectedDelegate(new Targetable.OnNotDetectedDelegate(this.ResetColor));
        component.AddOnHitColliderDelegate(new Targetable.OnHitColliderDelegate(this.OnHit));
    }