コード例 #1
0
ファイル: Controller.cs プロジェクト: Schmork/EvoMotion2D
        // Use this for initialization
        void Start()
        {
            Cooldown = new UnsignedMutateableParameter();
			MinTurnForce = new UnsignedMutateableParameter(0.01f);
			MaxTurnForce = new UnsignedMutateableParameter(1f);
			MaxPreyAngle = new ClampedMutateableParameter (1f, 180f);
			MaxPredatorAngle = new ClampedMutateableParameter (1f, 180f);
			//MaxPredatorAngle.Value = 45f;
            cellHandler = GetComponent<CellHandler>();
            sensorHandler = GetComponent<SensorHandler>();
            sprite = GetComponent<SpriteRenderer>();
            thruster = GetComponent<Thruster>();
            rb2d = GetComponent<Rigidbody2D>();
            LastEjection = Time.time;
        }
コード例 #2
0
ファイル: Sensor.cs プロジェクト: Schmork/EvoMotion2D
 void Start()
 {
     self = transform.parent.parent.gameObject;
     ch = GetComponentInParent<CellHandler>();
 }
コード例 #3
0
		public float RejuvenationFactor;		// age is reduced by collectedMass * this factor

        void Awake()
        {
            myRb = GetComponent<Rigidbody2D>();
            myCh = GetComponent<CellHandler>();
            mySr = GetComponent<SpriteRenderer>();
        }
コード例 #4
0
ファイル: Shrinker.cs プロジェクト: Schmork/EvoMotion2D
		// Use this for initialization
		void Start ()
		{
			StaticMinMass = MinMass;
			ch = GetComponent<CellHandler> ();
		}
コード例 #5
0
 void Start()
 {
     ch = GetComponent<CellHandler>();
 }
コード例 #6
0
ファイル: DragAdjuster.cs プロジェクト: Schmork/EvoMotion2D
 void Start()
 {
     ch = GetComponent<CellHandler>();
     rb = GetComponent<Rigidbody2D>();
 }
コード例 #7
0
ファイル: Thruster.cs プロジェクト: Schmork/EvoMotion2D
        void Awake ()
		{
            ThrustToMassRatio = new ClampedMutateableParameter(0.1f, 0.3f);
            ch = GetComponent<CellHandler> ();
        }